// Xampler, a MIDI-driven sampler
// Copyright (C) 2006 Nick Thomas
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
// 02110-1301 USA.

#ifndef XAMPLER_INSTRUMENT_EDITOR_HPP
#define XAMPLER_INSTRUMENT_EDITOR_HPP

// Holds the scrolled sample information editor widget.

#include "Instrument.hpp"
#include "SampleStrip.hpp"
#include "SynthMessage.hpp"
#include <gtkmm/box.h>
#include <gtkmm/scrolledwindow.h>

namespace xampler
{
    class InstrumentEditor : public Gtk::VBox
    {
    public:
        InstrumentEditor();

        // Sets which instrument is being displayed in the editor.
        void set_current_instrument(int instrument);

        void handle_synth_message(SynthMessage &msg);

    private:
        int m_current_instrument;
        Gtk::VBox m_sample_list;
        SampleStrip m_sample_strips[MAX_SAMPLES];
        Gtk::ScrolledWindow m_sample_list_scrollbar;
    };
}

#endif
